package com.aspose.cells;

class zbku extends zck {
   zbku(zn var1, float var2, float var3, zbkr var4) {
      super(var1, var2, var3, var4);
   }

   com.aspose.cells.b.a.b.a.ze a(com.aspose.cells.b.a.b.zq var1) {
      float var2 = 0.0F;
      float var3 = 0.0F;
      com.aspose.cells.b.a.b.a.ze var4 = new com.aspose.cells.b.a.b.a.ze();
      com.aspose.cells.b.a.b.zo[] var5 = new com.aspose.cells.b.a.b.zo[6];
      com.aspose.cells.b.a.b.zo[] var6 = new com.aspose.cells.b.a.b.zo[8];
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            var2 = Math.min(var1.h(), var1.i()) * com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F;
            var3 = Math.min(var1.h(), var1.i()) * com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 100000.0F;
         } else {
            var2 = 0.0F;
            var3 = 0.0F;
         }

         if (var2 != 0.0F && var3 == 0.0F) {
            switch(this.e.b) {
            case 1:
               var5[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
               var5[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
               var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var2);
               var5[3] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.m());
               var5[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
               var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var2 + var1.g());
               break;
            case 2:
               var5[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
               var5[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.g());
               var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var2 + var1.g());
               var5[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
               var5[4] = new com.aspose.cells.b.a.b.zo(var2 + var1.f(), var1.m());
               var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var2);
               break;
            case 3:
               var5[0] = new com.aspose.cells.b.a.b.zo(var2 + var1.f(), var1.g());
               var5[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
               var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var2);
               var5[3] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.m());
               var5[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
               var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var2 + var1.g());
               break;
            case 4:
               var5[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
               var5[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.g());
               var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var2 + var1.g());
               var5[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
               var5[4] = new com.aspose.cells.b.a.b.zo(var2 + var1.f(), var1.m());
               var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var2);
            }

            var4.a(var5[0], var5[1]);
            var4.a(var5[1], var5[2]);
            var4.a(var5[2], var5[3]);
            var4.a(var5[3], var5[4]);
            var4.a(var5[4], var5[5]);
            var4.a(var5[5], var5[0]);
         } else if (var2 == 0.0F && var3 != 0.0F) {
            switch(this.e.b) {
            case 1:
               var5[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
               var5[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.g());
               var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var3 + var1.g());
               var5[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
               var5[4] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.m());
               var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var3);
               break;
            case 2:
               var5[0] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.g());
               var5[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
               var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var3);
               var5[3] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.m());
               var5[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
               var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var3 + var1.g());
               break;
            case 3:
               var5[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
               var5[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.g());
               var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var3 + var1.g());
               var5[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
               var5[4] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.m());
               var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var3);
               break;
            case 4:
               var5[0] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.g());
               var5[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
               var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var3);
               var5[3] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.m());
               var5[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
               var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var3 + var1.g());
            }

            var4.a(var5[0], var5[1]);
            var4.a(var5[1], var5[2]);
            var4.a(var5[2], var5[3]);
            var4.a(var5[3], var5[4]);
            var4.a(var5[4], var5[5]);
            var4.a(var5[5], var5[0]);
         } else if (var2 != 0.0F && var3 != 0.0F) {
            switch(this.e.b) {
            case 1:
               var6[0] = new com.aspose.cells.b.a.b.zo(var2 + var1.f(), var1.g());
               var6[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.g());
               var6[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var3 + var1.g());
               var6[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var2);
               var6[4] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.m());
               var6[5] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.m());
               var6[6] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var3);
               var6[7] = new com.aspose.cells.b.a.b.zo(var1.f(), var2 + var1.g());
               break;
            case 2:
               var6[0] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.g());
               var6[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.g());
               var6[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var2 + var1.g());
               var6[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var3);
               var6[4] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.m());
               var6[5] = new com.aspose.cells.b.a.b.zo(var2 + var1.f(), var1.m());
               var6[6] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var2);
               var6[7] = new com.aspose.cells.b.a.b.zo(var1.f(), var3 + var1.g());
               break;
            case 3:
               var6[0] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.g());
               var6[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.g());
               var6[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var3 + var1.g());
               var6[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var2);
               var6[4] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.m());
               var6[5] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.m());
               var6[6] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var3);
               var6[7] = new com.aspose.cells.b.a.b.zo(var1.f(), var2 + var1.g());
               break;
            case 4:
               var6[0] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.g());
               var6[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.g());
               var6[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var2 + var1.g());
               var6[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var3);
               var6[4] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.m());
               var6[5] = new com.aspose.cells.b.a.b.zo(var2 + var1.f(), var1.m());
               var6[6] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var2);
               var6[7] = new com.aspose.cells.b.a.b.zo(var1.f(), var3 + var1.g());
            }

            var4.a(var6[0], var6[1]);
            var4.a(var6[1], var6[2]);
            var4.a(var6[2], var6[3]);
            var4.a(var6[3], var6[4]);
            var4.a(var6[4], var6[5]);
            var4.a(var6[5], var6[6]);
            var4.a(var6[6], var6[7]);
            var4.a(var6[7], var6[0]);
         } else if (var2 == 0.0F && var3 == 0.0F) {
            var4.b(var1);
         }
      } else {
         var3 = Math.min(var1.h(), var1.i()) * 0.16F;
         switch(this.e.b) {
         case 1:
            var5[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
            var5[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.g());
            var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var3 + var1.g());
            var5[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
            var5[4] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.m());
            var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var3);
            break;
         case 2:
            var5[0] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.g());
            var5[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
            var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var3);
            var5[3] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.m());
            var5[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
            var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var3 + var1.g());
            break;
         case 3:
            var5[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
            var5[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.g());
            var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var3 + var1.g());
            var5[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
            var5[4] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.m());
            var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var3);
            break;
         case 4:
            var5[0] = new com.aspose.cells.b.a.b.zo(var3 + var1.f(), var1.g());
            var5[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
            var5[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var3);
            var5[3] = new com.aspose.cells.b.a.b.zo(var1.l() - var3, var1.m());
            var5[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
            var5[5] = new com.aspose.cells.b.a.b.zo(var1.f(), var3 + var1.g());
         }

         var4.a(var5[0], var5[1]);
         var4.a(var5[1], var5[2]);
         var4.a(var5[2], var5[3]);
         var4.a(var5[3], var5[4]);
         var4.a(var5[4], var5[5]);
         var4.a(var5[5], var5[0]);
      }

      var4.i();
      return var4;
   }

   void a() {
      com.aspose.cells.b.a.b.zq var1 = this.d(this.e.v());
      super.c(var1);
   }

   private com.aspose.cells.b.a.b.zq d(com.aspose.cells.b.a.b.zq var1) {
      float var2 = 0.0F;
      float var3 = 0.0F;
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            var2 = Math.min(var1.h(), var1.i()) * com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F;
            var3 = Math.min(var1.h(), var1.i()) * com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 100000.0F;
         } else {
            var2 = 0.0F;
            var3 = 0.0F;
         }
      } else {
         var3 = Math.min(var1.h(), var1.i()) * 0.16F;
      }

      if (var2 <= 0.0F && var3 <= 0.0F) {
         return var1;
      } else {
         com.aspose.cells.b.a.b.zq var4 = new com.aspose.cells.b.a.b.zq(var1.f(), var1.g(), var1.h(), var1.i());
         float var5 = var2 / 2.0F;
         float var6 = var3 / 2.0F;
         float var7 = var5 > var6 ? var5 : var6;
         var4.a(var4.f() + var7);
         var4.c(var4.h() - var7);
         var4.c(var4.h() - var7);
         var4.b(var4.g() + var7);
         var4.d(var4.i() - var7);
         var4.d(var4.i() - var7);
         return var4;
      }
   }
}
